import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from "@/pages/Home.vue";
import NewsList from "@/pages/NewsList.vue";
import GoodsList from "@/pages/GoodsList.vue";
import My from "@/pages/My.vue";
import NotFound from "@/pages/NotFound.vue";
import Login from "@/pages/Login.vue";
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component:Home
  },
  {
    path: '/newslist',
    component: NewsList
  },
  {
    path: '/goodslist',
    component: GoodsList
  },
  {
    path: '/my',
    component: My
  },
  {
    path: '/login',
    component: Login,
    name:'login',
    meta:{
      hideNav:true
    }
  },
  {
    path: '*',
    component: NotFound,
    name:'notfound',
    meta:{
      hideNav:true
    }
  }
]

const router = new VueRouter({
  mode: 'history',
  routes
})

export default router
